package chapter.job2;

//姓名，年龄，教龄和性别属性，
// 都有自我介绍(selfIntroduce)和上课(giveLession)的方法。
public class common {
    public String name;
    public int age;
    public String sex;

    //自我介绍
    public void selfIntroduce() {
        System.out.println("姓名："+name+"年龄："+age+"性别："+sex);
    }

    //上课
    public void giveLession() {

    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public String getSex() {
        return sex;
    }

    public common(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public common() {
    }
}
